package com.test.t1;

import com.test.aop.MathCalculator;
import com.test.config.MainConfigAop;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/11/29 16:48
 */
public class IocTest_aop {
    @Test
    public void test01() {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfigAop.class);

        MathCalculator calculator = context.getBean(MathCalculator.class);
        calculator.div(5, 0);

        context.close();
    }
}
